//---------------------------------------------------------------------------

#include "vcl_stl.h"
#pragma hdrstop
#include <tchar.h>

#include "h_base.h"
#include "h_xml.h"
#include "h_global.h"
using namespace h_base;
using namespace h_xml;

#include "h_g.h"
//---------------------------------------------------------------------------
#include <Vcl.Styles.hpp>
#include <Vcl.Themes.hpp>
USEFORM("t_eventfireform.cpp", EventFireForm);
USEFORM("t_dummyform.cpp", DummyForm);
USEFORM("t_externjobform.cpp", ExternJobForm);
USEFORM("t_eventwaitform.cpp", EventWaitForm);
USEFORM("t_batform.cpp", BatForm);
USEFORM("t_batchjobform.cpp", BatchJobForm);
USEFORM("t_downloadform.cpp", DownloadForm);
USEFORM("t_connectorform.cpp", ConnectorForm);
USEFORM("t_groupform.cpp", GroupForm);
USEFORM("t_selectskinform.cpp", SelectSkinForm);
USEFORM("t_selectgroupform.cpp", SelectGroupForm);
USEFORM("t_transferprogressform.cpp", TransferProgressForm);
USEFORM("t_timeform.cpp", TimeForm);
USEFORM("t_mainform.cpp", MainForm);
USEFORM("t_listform.cpp", ListForm);
USEFORM("t_passwordform.cpp", PasswordForm);
USEFORM("t_normaljobform.cpp", NormalJobForm);
USEFORM("t_aboutform.cpp", AboutForm);
USEFORM("t_confirmform.cpp", ConfirmForm);
//---------------------------------------------------------------------------
int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
	try
	{
		Application->Initialize();
		Application->MainFormOnTaskBar = true;
		Application->CreateForm(__classid(TMainForm), &MainForm);
       Application->CreateForm(__classid(TAboutForm), &AboutForm);
       Application->CreateForm(__classid(TDummyForm), &DummyForm);
       Application->CreateForm(__classid(TNormalJobForm), &NormalJobForm);
       Application->CreateForm(__classid(TConnectorForm), &ConnectorForm);
       Application->CreateForm(__classid(TExternJobForm), &ExternJobForm);
       Application->CreateForm(__classid(TEventFireForm), &EventFireForm);
       Application->CreateForm(__classid(TBatchJobForm), &BatchJobForm);
       Application->CreateForm(__classid(TGroupForm), &GroupForm);
       Application->CreateForm(__classid(TBatForm), &BatForm);
       Application->CreateForm(__classid(TTransferProgressForm), &TransferProgressForm);
       Application->CreateForm(__classid(TSelectGroupForm), &SelectGroupForm);
       Application->CreateForm(__classid(TSelectSkinForm), &SelectSkinForm);
       Application->CreateForm(__classid(TPasswordForm), &PasswordForm);
       Application->CreateForm(__classid(TListForm), &ListForm);
       Application->CreateForm(__classid(TDownloadForm), &DownloadForm);
       Application->CreateForm(__classid(TEventWaitForm), &EventWaitForm);
       Application->CreateForm(__classid(TTimeForm), &TimeForm);
       Application->CreateForm(__classid(TConfirmForm), &ConfirmForm);
       h_g::Init();
       Application->Run();
	}
	catch (Exception &exception)
	{
		Application->ShowException(&exception);
	}
	catch (...)
	{
		try
		{
			throw Exception("");
		}
		catch (Exception &exception)
		{
			Application->ShowException(&exception);
		}
	}
	return 0;
}
//---------------------------------------------------------------------------
